Xbasic

FILE.ZIPLIST Function

Syntax

File_List as C = FILE.ZipList(C zipfilename[,C Separator])

Arguments

zipfilenameCharacter

The name of the zip file to open.

SeparatorCharacter

Information about how to format the output. You can use the following codes in the Format_String.

All other characters in the Format_String will print as is. For example, to create a comma separated list of files in the zip file, you would use this format string: "n" + ","

To create list of filenames in the zip file with each name on its own line, you would use this format string: "n" + chr(13) + chr(10)

Code

Description

"n"

name

"o"

original size

"c"

compressed size

"d"

date

"m"

method of compression

"p"

percent compression of file

Returns

File_ListCharacter

Returns the list of files in the zip file.

Description

Report on the contents of a zip file.

Discussion

The FILE.ZIPLIST() method returns a character string with all of the files in Zip_Filename, formatted according to the Format_String.

Example

This script lists all of the files in a zip file to the Trace window.

trace.writeln(FILE.ziplist("c:\ziplist.zip", "n" + chr(13) + chr(10)))
FILE.ZIPLIST does not support creating password protected zip archives.

See Also